Skip to content

AP-870: Make location requests OCLC limit configurable - #61

Merged
anarchivist merged 4 commits into
mainfrom
AP-870
Sep 2, 2026
Merged

AP-870: Make location requests OCLC limit configurable#61
anarchivist merged 4 commits into
mainfrom
AP-870

Conversation

@anarchivist

@anarchivist anarchivist commented Sep 1, 2026

Copy link
Copy Markdown
Member

Read FRAMEWORK_LOCATION_REQUESTS_MAX_OCLC_NUMBERS through altmedia configuration and expose it on Rails configuration so LocationRequest::MAX_OCLC_NUMBERS can be adjusted without a code change.

Add a sample env value and targeted coverage for config parsing, display formatting, and the over-limit spreadsheet check.

Read FRAMEWORK_LOCATION_REQUESTS_MAX_OCLC_NUMBERS through altmedia configuration and expose it on Rails configuration so LocationRequest::MAX_OCLC_NUMBERS can be adjusted without a code change.

Add a sample env value and targeted coverage for config parsing, display formatting, and the over-limit spreadsheet check.

Co-authored-by: Codex GPT-5 <noreply@openai.com>

@davezuckerman davezuckerman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a question about the defaults being 50000. Also I'm assuming there will be another pull request to update the wording on the view which says to limit requests to 50000.

Comment thread config/altmedia.yml Outdated
Comment thread .env.sample Outdated
@anarchivist

Copy link
Copy Markdown
Member Author

@davezuckerman the form partial already calls LocationRequest#max_oclc_numbers to get the number.

@awilfox awilfox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc after the default is fixed.

Comment thread config/altmedia.yml

@davezuckerman davezuckerman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after the test is updated for 10000 as opposed to 50000

@awilfox awilfox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc with the logic of my other review swapped.

Comment thread spec/config/altmedia_spec.rb Outdated
Co-authored-by: Anna Wilcox <AWilcox@Wilcox-Tech.com>
@awilfox

awilfox commented Sep 2, 2026

Copy link
Copy Markdown
Member

The test failures are in the location request spec; since it's testing the handling of large requests, we may want to temporarily inject a higher cap into the environment for those tests. Otherwise this looks good.

Update the configuration spec for the new 10,000 default and keep the large-record LocationRequest model spec above the batch boundary without depending on the default cap.

Co-authored-by: Codex GPT-5 <noreply@openai.com>

@awilfox awilfox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ looks great!

@anarchivist
anarchivist merged commit 100cf99 into main Sep 2, 2026
5 checks passed
@anarchivist
anarchivist deleted the AP-870 branch September 2, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants